#include <bits/stdc++.h>

using namespace std;

int n, x, ans;
int attack[100005], alive[100005];

int main () {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    for (int i = 1; i <= n; i++){
        cin >> x;
        alive[x]++;
    }
    memcpy (attack, alive, sizeof alive);
    for (int i = 1, j; i <= 100000; i++) {
        if (!alive[i]) continue;
        j = i + 1;
        while (alive[i]){
            for(; j <= 100000; j++) if (attack[j]) break;
            if (j > 100000) break;
            int tmp = alive[i] - attack[j];
            alive[i] = max(0, tmp);
            attack[j] = max(0, -tmp);
        }
    }
    for (int i = 1; i <= 100000; i++) ans += alive[i];
    cout << ans << endl;
    return 0;
}
